package com.atguigu.spzx.pay.mapper;

import com.atguigu.spzx.pay.entity.PaymentInfo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface PaymentInfoMapper extends BaseMapper<PaymentInfo> {
    /**
     * 根据订单号查询
     * @param orderNo
     * @return
     */
    default PaymentInfo getPaymentInfoByOrderNo(String orderNo){
        QueryWrapper<PaymentInfo> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("order_no", orderNo);
        return this.selectOne(queryWrapper);
    }
}
